using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace HRM.Models.Mapping
{
    public class dm_dk_HDHocThuatMap : EntityTypeConfiguration<dm_dk_HDHocThuat>
    {
        public dm_dk_HDHocThuatMap()
        {
            // Primary Key
            this.HasKey(t => t.MaDKHDHT);

            // Properties
            this.Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.MaDKHDHT)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.TenDKHDHT)
                .HasMaxLength(200);

            this.Property(t => t.HDKhac)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("dm_dk_HDHocThuat");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.MaDKHDHT).HasColumnName("MaDKHDHT");
            this.Property(t => t.TenDKHDHT).HasColumnName("TenDKHDHT");
            this.Property(t => t.TrangThai).HasColumnName("TrangThai");
            this.Property(t => t.HDKhac).HasColumnName("HDKhac");
        }
    }
}
